package User;

import Book.BookList;
import Operation.*;

import java.util.Scanner;
public class Administrator extends User {
    public Administrator(String name) {
        super(name);
    }
    public int enu(String name){
        System.out.println("欢迎"+name+"的到来");
        System.out.println("******************");
        System.out.println("0.退出系统");
        System.out.println("1.增加图书");
        System.out.println("2.减少图书");
        System.out.println("3.查找图书");
        System.out.println("4.借阅图书");
        System.out.println("5.归还图书");
        System.out.println("6.显示图书");
        System.out.println("******************");
        System.out.println("请选择你的操作：");
        Scanner scanner=new Scanner(System.in);
        int choice= scanner.nextInt();
        return choice;
    }
    Interface[] interfaces={
            new Exitoperation(),
            new Addoperation(),
            new Deloperation(),
            new Findoperation(),
            new Borrowoperation(),
            new Returnoperation(),
            new Displayoperation()
    };

    public void Do(int choice, BookList bookList){
        interfaces[choice].work(bookList);
    }
}
